const { merge } = require('webpack-merge')
const baseConf = require('./webpack.common')
const path = require('path')

module.exports = merge(baseConf, {
  mode: 'development',
  devtool: 'cheap-eval-module-source-map',
  devServer: {
    // 开启HRM
    hot: true,
    // 打包完后自动打开浏览器
    open: true,
    // 指定额外的静态资源路径
    contentBase: path.join(__dirname, './dist'),
    // publicPath: '/'
  },
  module: {
    rules: [
      {
        test: /\.css$/,
        use: [
          'style-loader',
          'css-loader',
        ]
      },
    ]
  }
})
